:root {
	tab-size: 2;

	--background: rgb(255, 255, 255);
	--color: rgb(74, 74, 79);

	--t-duration: 240ms;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	height: 100%;
}

body {
	display: flex;
	margin: 0;
	height: 100%;
	background: var(--background);
	color: var(--color);
	font-family: monospace;
}
body.dark {
	--color: rgb(177, 177, 179);
	--background: rgb(36, 36, 36);
	scrollbar-color: rgb(115, 115, 115) rgb(60, 60, 61);
}

/* dark mode scrollbar */
body.dark ::-webkit-scrollbar {
	width: 0.75rem;
	height: 0.5rem;
	background-color: transparent;
}
body.dark ::-webkit-scrollbar-thumb {
	background-color: rgb(51, 51, 51);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 0.25rem;
}

/* basic resets */
ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* expandable arrows */
.expandable::before {
	content: '';
	position: absolute;
	top: 0;
	left: calc(var(--indent, 6px) - 6px);

	border-top: 0.375rem solid rgba(135, 135, 137, 0.9);
	border-right: 0.25rem solid transparent;
	border-left: 0.25rem solid transparent;
	transition-duration: var(--t-duration);
	transform: translate3d(0%, calc(50% + 0.25rem + var(--y-pad, 0px)), 0) rotate(-90deg);
	/* transform: translate3d(-150%, calc(50% + 0.25rem + var(--y-pad, 0px)), 0) rotate(-90deg); */
}
.expandable.expanded::before {
	transform: translate3d(0%, calc(50% + 0.25rem + var(--y-pad, 0px)), 0) rotate(0deg);
	/* transform: translate3d(-150%, calc(50% + 0.25rem + var(--y-pad, 0px)), 0) rotate(0deg); */
}

/* tooltip pseudo-elements */
[data-tooltip]:hover::after,
[data-tooltip]:hover::before {
	opacity: 1;
	pointer-events: auto;
}
[data-tooltip]::before {
	content: '';
	opacity: 0;
	pointer-events: none;

	position: absolute;
	bottom: -0.2rem;
	left: 2.5rem;
	border-right: 0.5rem solid transparent;
	border-bottom: 0.5rem solid rgb(48, 64, 81);
	border-left: 0.5rem solid transparent;
	transition: opacity 0.2s;
}
[data-tooltip]::after {
	content: attr(data-tooltip);
	opacity: 0;
	pointer-events: none;
	z-index: 1;
	position: absolute;
	bottom: 0;
	left: 0;

	display: flex;
	padding: 0.25rem 0.375rem;
	border-radius: 0.25rem;
	transition: opacity 0.2s;
	transform: translateY(100%);

	background-color: rgb(48, 64, 81);
	color: white;
}
